using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace Mpi.Common.Controls
{
    public class ToolStripDateTimePicker : ToolStripControlHost
    {
        public DateTimePicker DateTimePicker
        {
            get
            {
                return base.Control as DateTimePicker;
            }
        }


        public ToolStripDateTimePicker() : base(new DateTimePicker())
        {
            var now = DateTime.Now;
            DateTimePicker.Value = new DateTime(now.Year, now.Month, now.Day, now.Hour, now.Minute, 0);
            DateTimePicker.Format = DateTimePickerFormat.Custom;
            DateTimePicker.CustomFormat = "yyyy/MM/dd - HH:mm:ss";
        }
    }
}
